--尽精求巧-弃牌
local jinjingqiuqiao_active = fk.CreateSkill {
    name = "mcdh_jinjingqiuqiao_active",
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

jinjingqiuqiao_active:addEffect('active',{
    card_num = 2,
    target_num = 0,
    card_filter = function(self,player, to_select, selected, targets)
        local card = Fk:getCardById(to_select)
        if player:prohibitDiscard(card) then return false end
        if #selected == 0 then return true end
        return #selected < 2 and card.color == Fk:getCardById(selected[1]).color
    end,
})

Fk:loadTranslationTable {
    ["mcdh_jinjingqiuqiao_active"] = "尽精求巧",
    ["#mcdh_jinjingqiuqiao-discard"] = "尽精求巧: 弃置两张颜色相同的牌",
}

return jinjingqiuqiao_active